<%@ page contentType="text/html; charset=gb2312" language="java"%>
<%@ page language="java" import="java.util.*,control.database.*,java.sql.*"%>
<%
String BranchNo="0";
String SubCenterNo="";
String BranchName="";
//response.setCharacterEncoding("gb2312");
if(request.getParameter("subCenterNo")!=null){
	SubCenterNo=request.getParameter("subCenterNo");
}
if(request.getParameter("subCenterName")!=null){
	BranchName=new String(request.getParameter("subCenterName").toString().getBytes("ISO8859_1"));
}

String sql="insert into  dbo.CQ_Cmn_Branch(BranchNo,BranchName,SubCenterNo)values('0','"+BranchName+"','"+SubCenterNo+"')";
	System.out.println("INSERT: "+BranchName+"  "+sql);
	DataBase db2 = new DataBase();
	db2.executeUpdate(sql);
	db2.closeStmt();
	db2.closeConn();
response.sendRedirect("SubCenterNo_add_success.jsp?BranchNo=0&flag=add&SubCenterNo="+SubCenterNo);
%>